package chapter03.d04;

public class MyRunnable implements Runnable {
	private String task;
	
	public MyRunnable(String name) {
		super();
		this.task = name;
	}

	@Override
	public void run() {
		for (int x = 0; x < 100; x++) {
			System.out.println(Thread.currentThread().getName() + "正在执行任务["+task+ "]:" + x);
		}
	}

	public String getTask() {
		return task;
	}

	public void setTask(String task) {
		this.task = task;
	}
	
	
}
